/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package jtwitterclient;

import javax.swing.SwingUtilities;

/**
 *
 * @author Administrator
 */
public class NewClass {

    static int i = 0;

    public static void main(String[] args) {


        final Runnable doHelloWorld = new Runnable() {

            public void run() {
                i = 900;
                System.out.println("Hello World on " + Thread.currentThread());
            }
        };

        Thread appThread = new Thread() {

            @Override
            public void run() {
                try {
                    SwingUtilities.invokeAndWait(doHelloWorld);
                    // SwingUtilities.invokeLater(doHelloWorld);
                } catch (Exception e) {
                    e.printStackTrace();
                }
                System.out.println("Finished on " + Thread.currentThread() + i);
            }
        };
        appThread.start();
    }
}
